\(\int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx\) [30]
Optimal result
Integrand size = 20, antiderivative size = 257 \[
\int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=-\frac {i b^2 (c+d x)^2}{f}+\frac {a^2 (c+d x)^3}{3 d}-\frac {4 i a b (c+d x)^2 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {2 b^2 d (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f^2}+\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}-\frac {i b^2 d^2 \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^3}-\frac {4 a b d^2 \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3}+\frac {4 a b d^2 \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3}+\frac {b^2 (c+d x)^2 \tan (e+f x)}{f}
\]
[Out]
-I*b^2*(d*x+c)^2/f+1/3*a^2*(d*x+c)^3/d-4*I*a*b*(d*x+c)^2*arctan(exp(I*(f*x+e)))/f+2*b^2*d*(d*x+c)*ln(1+exp(2*I
*(f*x+e)))/f^2+4*I*a*b*d*(d*x+c)*polylog(2,-I*exp(I*(f*x+e)))/f^2-4*I*a*b*d*(d*x+c)*polylog(2,I*exp(I*(f*x+e))
)/f^2-I*b^2*d^2*polylog(2,-exp(2*I*(f*x+e)))/f^3-4*a*b*d^2*polylog(3,-I*exp(I*(f*x+e)))/f^3+4*a*b*d^2*polylog(
3,I*exp(I*(f*x+e)))/f^3+b^2*(d*x+c)^2*tan(f*x+e)/f
Rubi [A] (verified)
Time = 0.38 (sec) , antiderivative size = 257, normalized size of antiderivative = 1.00, number of
steps used = 14, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {4275, 4266, 2611, 2320,
6724, 4269, 3800, 2221, 2317, 2438} \[
\int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=\frac {a^2 (c+d x)^3}{3 d}-\frac {4 i a b (c+d x)^2 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}-\frac {4 a b d^2 \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3}+\frac {4 a b d^2 \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3}+\frac {2 b^2 d (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f^2}+\frac {b^2 (c+d x)^2 \tan (e+f x)}{f}-\frac {i b^2 (c+d x)^2}{f}-\frac {i b^2 d^2 \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^3}
\]
[In]
Int[(c + d*x)^2*(a + b*Sec[e + f*x])^2,x]
[Out]
((-I)*b^2*(c + d*x)^2)/f + (a^2*(c + d*x)^3)/(3*d) - ((4*I)*a*b*(c + d*x)^2*ArcTan[E^(I*(e + f*x))])/f + (2*b^
2*d*(c + d*x)*Log[1 + E^((2*I)*(e + f*x))])/f^2 + ((4*I)*a*b*d*(c + d*x)*PolyLog[2, (-I)*E^(I*(e + f*x))])/f^2
- ((4*I)*a*b*d*(c + d*x)*PolyLog[2, I*E^(I*(e + f*x))])/f^2 - (I*b^2*d^2*PolyLog[2, -E^((2*I)*(e + f*x))])/f^
3 - (4*a*b*d^2*PolyLog[3, (-I)*E^(I*(e + f*x))])/f^3 + (4*a*b*d^2*PolyLog[3, I*E^(I*(e + f*x))])/f^3 + (b^2*(c
+ d*x)^2*Tan[e + f*x])/f
Rule 2221
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
(f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
- Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Rule 2317
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Rule 2320
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]
Rule 2438
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
e, n}, x] && EqQ[c*d, 1]
Rule 2611
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(
f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Dist[g*(m/(b*c*n*Log[F])), Int[(f + g*
x)^(m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]
Rule 3800
Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[I*((c + d*x)^(m + 1)/(d*(m + 1))), x
] - Dist[2*I, Int[(c + d*x)^m*(E^(2*I*(e + f*x))/(1 + E^(2*I*(e + f*x)))), x], x] /; FreeQ[{c, d, e, f}, x] &&
IGtQ[m, 0]
Rule 4266
Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[-2*(c + d*x)^m*(ArcTanh[E
^(I*k*Pi)*E^(I*(e + f*x))]/f), x] + (-Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))],
x], x] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e,
f}, x] && IntegerQ[2*k] && IGtQ[m, 0]
Rule 4269
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Rule 4275
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
Rule 6724
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]
Rubi steps \begin{align*}
\text {integral}& = \int \left (a^2 (c+d x)^2+2 a b (c+d x)^2 \sec (e+f x)+b^2 (c+d x)^2 \sec ^2(e+f x)\right ) \, dx \\ & = \frac {a^2 (c+d x)^3}{3 d}+(2 a b) \int (c+d x)^2 \sec (e+f x) \, dx+b^2 \int (c+d x)^2 \sec ^2(e+f x) \, dx \\ & = \frac {a^2 (c+d x)^3}{3 d}-\frac {4 i a b (c+d x)^2 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {b^2 (c+d x)^2 \tan (e+f x)}{f}-\frac {(4 a b d) \int (c+d x) \log \left (1-i e^{i (e+f x)}\right ) \, dx}{f}+\frac {(4 a b d) \int (c+d x) \log \left (1+i e^{i (e+f x)}\right ) \, dx}{f}-\frac {\left (2 b^2 d\right ) \int (c+d x) \tan (e+f x) \, dx}{f} \\ & = -\frac {i b^2 (c+d x)^2}{f}+\frac {a^2 (c+d x)^3}{3 d}-\frac {4 i a b (c+d x)^2 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}+\frac {b^2 (c+d x)^2 \tan (e+f x)}{f}-\frac {\left (4 i a b d^2\right ) \int \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right ) \, dx}{f^2}+\frac {\left (4 i a b d^2\right ) \int \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right ) \, dx}{f^2}+\frac {\left (4 i b^2 d\right ) \int \frac {e^{2 i (e+f x)} (c+d x)}{1+e^{2 i (e+f x)}} \, dx}{f} \\ & = -\frac {i b^2 (c+d x)^2}{f}+\frac {a^2 (c+d x)^3}{3 d}-\frac {4 i a b (c+d x)^2 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {2 b^2 d (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f^2}+\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}+\frac {b^2 (c+d x)^2 \tan (e+f x)}{f}-\frac {\left (4 a b d^2\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-i x)}{x} \, dx,x,e^{i (e+f x)}\right )}{f^3}+\frac {\left (4 a b d^2\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,i x)}{x} \, dx,x,e^{i (e+f x)}\right )}{f^3}-\frac {\left (2 b^2 d^2\right ) \int \log \left (1+e^{2 i (e+f x)}\right ) \, dx}{f^2} \\ & = -\frac {i b^2 (c+d x)^2}{f}+\frac {a^2 (c+d x)^3}{3 d}-\frac {4 i a b (c+d x)^2 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {2 b^2 d (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f^2}+\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}-\frac {4 a b d^2 \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3}+\frac {4 a b d^2 \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3}+\frac {b^2 (c+d x)^2 \tan (e+f x)}{f}+\frac {\left (i b^2 d^2\right ) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i (e+f x)}\right )}{f^3} \\ & = -\frac {i b^2 (c+d x)^2}{f}+\frac {a^2 (c+d x)^3}{3 d}-\frac {4 i a b (c+d x)^2 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {2 b^2 d (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f^2}+\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}-\frac {i b^2 d^2 \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^3}-\frac {4 a b d^2 \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3}+\frac {4 a b d^2 \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3}+\frac {b^2 (c+d x)^2 \tan (e+f x)}{f} \\
\end{align*}
Mathematica [A] (verified)
Time = 1.54 (sec) , antiderivative size = 356, normalized size of antiderivative = 1.39
\[
\int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=\frac {3 a^2 c^2 f^3 x-3 i b^2 d^2 f^2 x^2+3 a^2 c d f^3 x^2+a^2 d^2 f^3 x^3-24 i a b c d f^2 x \arctan \left (e^{i (e+f x)}\right )-12 i a b d^2 f^2 x^2 \arctan \left (e^{i (e+f x)}\right )+6 a b c^2 f^2 \text {arctanh}(\sin (e+f x))+6 b^2 d^2 f x \log \left (1+e^{2 i (e+f x)}\right )+6 b^2 c d f \log (\cos (e+f x))+12 i a b d f (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )-12 i a b d f (c+d x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )-3 i b^2 d^2 \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )-12 a b d^2 \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )+12 a b d^2 \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )+3 b^2 c^2 f^2 \tan (e+f x)+6 b^2 c d f^2 x \tan (e+f x)+3 b^2 d^2 f^2 x^2 \tan (e+f x)}{3 f^3}
\]
[In]
Integrate[(c + d*x)^2*(a + b*Sec[e + f*x])^2,x]
[Out]
(3*a^2*c^2*f^3*x - (3*I)*b^2*d^2*f^2*x^2 + 3*a^2*c*d*f^3*x^2 + a^2*d^2*f^3*x^3 - (24*I)*a*b*c*d*f^2*x*ArcTan[E
^(I*(e + f*x))] - (12*I)*a*b*d^2*f^2*x^2*ArcTan[E^(I*(e + f*x))] + 6*a*b*c^2*f^2*ArcTanh[Sin[e + f*x]] + 6*b^2
*d^2*f*x*Log[1 + E^((2*I)*(e + f*x))] + 6*b^2*c*d*f*Log[Cos[e + f*x]] + (12*I)*a*b*d*f*(c + d*x)*PolyLog[2, (-
I)*E^(I*(e + f*x))] - (12*I)*a*b*d*f*(c + d*x)*PolyLog[2, I*E^(I*(e + f*x))] - (3*I)*b^2*d^2*PolyLog[2, -E^((2
*I)*(e + f*x))] - 12*a*b*d^2*PolyLog[3, (-I)*E^(I*(e + f*x))] + 12*a*b*d^2*PolyLog[3, I*E^(I*(e + f*x))] + 3*b
^2*c^2*f^2*Tan[e + f*x] + 6*b^2*c*d*f^2*x*Tan[e + f*x] + 3*b^2*d^2*f^2*x^2*Tan[e + f*x])/(3*f^3)
Maple [B] (verified)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 661 vs. \(2 (232 ) = 464\).
Time = 1.38 (sec) , antiderivative size = 662, normalized size of antiderivative = 2.58
| | |
method | result | size |
| | |
risch |
\(\frac {4 a b \,d^{2} \operatorname {polylog}\left (3, i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}-\frac {4 a b \,d^{2} \operatorname {polylog}\left (3, -i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}+a^{2} d c \,x^{2}+a^{2} c^{2} x +\frac {4 b a c d \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}-\frac {4 i b a \,d^{2} \operatorname {polylog}\left (2, i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f^{2}}+\frac {4 i b a \,d^{2} \operatorname {polylog}\left (2, -i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f^{2}}+\frac {4 i b a c d \operatorname {polylog}\left (2, -i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}-\frac {4 i b a c d \operatorname {polylog}\left (2, i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}-\frac {4 i b a \,d^{2} e^{2} \arctan \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}-\frac {4 b a c d \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}+\frac {4 b a c d \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}-\frac {4 b a c d \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}+\frac {8 i b a c d e \arctan \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+\frac {a^{2} d^{2} x^{3}}{3}+\frac {a^{2} c^{3}}{3 d}-\frac {i b^{2} d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (f x +e \right )}\right )}{f^{3}}+\frac {2 i b^{2} \left (d^{2} x^{2}+2 c d x +c^{2}\right )}{f \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )}+\frac {4 b^{2} d^{2} e \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}+\frac {2 b^{2} c d \ln \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )}{f^{2}}-\frac {4 b^{2} c d \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+\frac {2 b^{2} d^{2} \ln \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right ) x}{f^{2}}-\frac {2 i b^{2} d^{2} x^{2}}{f}-\frac {2 i b^{2} d^{2} e^{2}}{f^{3}}-\frac {2 b a \,d^{2} \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right ) x^{2}}{f}+\frac {2 b a \,d^{2} \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right ) x^{2}}{f}+\frac {2 b \,e^{2} d^{2} a \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}-\frac {2 b \,e^{2} d^{2} a \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}-\frac {4 i b^{2} d^{2} e x}{f^{2}}-\frac {4 i b a \,c^{2} \arctan \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f}\) |
\(662\) |
| | |
|
|
|
[In]
int((d*x+c)^2*(a+b*sec(f*x+e))^2,x,method=_RETURNVERBOSE)
[Out]
-4*a*b*d^2*polylog(3,-I*exp(I*(f*x+e)))/f^3+4*a*b*d^2*polylog(3,I*exp(I*(f*x+e)))/f^3-I*b^2*d^2*polylog(2,-exp
(2*I*(f*x+e)))/f^3+4/f^2*b*a*c*d*ln(1-I*exp(I*(f*x+e)))*e-4*I/f^2*b*a*d^2*polylog(2,I*exp(I*(f*x+e)))*x+4*I/f^
2*b*a*d^2*polylog(2,-I*exp(I*(f*x+e)))*x+4*I/f^2*b*a*c*d*polylog(2,-I*exp(I*(f*x+e)))-4*I/f^2*b*a*c*d*polylog(
2,I*exp(I*(f*x+e)))-4*I/f^3*b*a*d^2*e^2*arctan(exp(I*(f*x+e)))-4/f*b*a*c*d*ln(1+I*exp(I*(f*x+e)))*x+4/f*b*a*c*
d*ln(1-I*exp(I*(f*x+e)))*x-4/f^2*b*a*c*d*ln(1+I*exp(I*(f*x+e)))*e-2/f*b*a*d^2*ln(1+I*exp(I*(f*x+e)))*x^2+2/f*b
*a*d^2*ln(1-I*exp(I*(f*x+e)))*x^2+2/f^3*b*e^2*d^2*a*ln(1+I*exp(I*(f*x+e)))-2/f^3*b*e^2*d^2*a*ln(1-I*exp(I*(f*x
+e)))-4*I/f^2*b^2*d^2*e*x-4*I/f*b*a*c^2*arctan(exp(I*(f*x+e)))+a^2*d*c*x^2+a^2*c^2*x+1/3*a^2*d^2*x^3+1/3*a^2/d
*c^3+2*I*b^2*(d^2*x^2+2*c*d*x+c^2)/f/(1+exp(2*I*(f*x+e)))+4/f^3*b^2*d^2*e*ln(exp(I*(f*x+e)))+2/f^2*b^2*c*d*ln(
1+exp(2*I*(f*x+e)))-4/f^2*b^2*c*d*ln(exp(I*(f*x+e)))+2/f^2*b^2*d^2*ln(1+exp(2*I*(f*x+e)))*x-2*I/f*b^2*d^2*x^2-
2*I/f^3*b^2*d^2*e^2+8*I/f^2*b*a*c*d*e*arctan(exp(I*(f*x+e)))
Fricas [B] (verification not implemented)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 1056 vs. \(2 (220) = 440\).
Time = 0.37 (sec) , antiderivative size = 1056, normalized size of antiderivative = 4.11
\[
\int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^2*(a+b*sec(f*x+e))^2,x, algorithm="fricas")
[Out]
-1/3*(6*a*b*d^2*cos(f*x + e)*polylog(3, I*cos(f*x + e) + sin(f*x + e)) - 6*a*b*d^2*cos(f*x + e)*polylog(3, I*c
os(f*x + e) - sin(f*x + e)) + 6*a*b*d^2*cos(f*x + e)*polylog(3, -I*cos(f*x + e) + sin(f*x + e)) - 6*a*b*d^2*co
s(f*x + e)*polylog(3, -I*cos(f*x + e) - sin(f*x + e)) + 3*(2*I*a*b*d^2*f*x + 2*I*a*b*c*d*f - I*b^2*d^2)*cos(f*
x + e)*dilog(I*cos(f*x + e) + sin(f*x + e)) + 3*(2*I*a*b*d^2*f*x + 2*I*a*b*c*d*f + I*b^2*d^2)*cos(f*x + e)*dil
og(I*cos(f*x + e) - sin(f*x + e)) + 3*(-2*I*a*b*d^2*f*x - 2*I*a*b*c*d*f + I*b^2*d^2)*cos(f*x + e)*dilog(-I*cos
(f*x + e) + sin(f*x + e)) + 3*(-2*I*a*b*d^2*f*x - 2*I*a*b*c*d*f - I*b^2*d^2)*cos(f*x + e)*dilog(-I*cos(f*x + e
) - sin(f*x + e)) - 3*(a*b*d^2*e^2 + a*b*c^2*f^2 - b^2*d^2*e - (2*a*b*c*d*e - b^2*c*d)*f)*cos(f*x + e)*log(cos
(f*x + e) + I*sin(f*x + e) + I) + 3*(a*b*d^2*e^2 + a*b*c^2*f^2 + b^2*d^2*e - (2*a*b*c*d*e + b^2*c*d)*f)*cos(f*
x + e)*log(cos(f*x + e) - I*sin(f*x + e) + I) - 3*(a*b*d^2*f^2*x^2 - a*b*d^2*e^2 + 2*a*b*c*d*e*f + b^2*d^2*e +
(2*a*b*c*d*f^2 + b^2*d^2*f)*x)*cos(f*x + e)*log(I*cos(f*x + e) + sin(f*x + e) + 1) + 3*(a*b*d^2*f^2*x^2 - a*b
*d^2*e^2 + 2*a*b*c*d*e*f - b^2*d^2*e + (2*a*b*c*d*f^2 - b^2*d^2*f)*x)*cos(f*x + e)*log(I*cos(f*x + e) - sin(f*
x + e) + 1) - 3*(a*b*d^2*f^2*x^2 - a*b*d^2*e^2 + 2*a*b*c*d*e*f + b^2*d^2*e + (2*a*b*c*d*f^2 + b^2*d^2*f)*x)*co
s(f*x + e)*log(-I*cos(f*x + e) + sin(f*x + e) + 1) + 3*(a*b*d^2*f^2*x^2 - a*b*d^2*e^2 + 2*a*b*c*d*e*f - b^2*d^
2*e + (2*a*b*c*d*f^2 - b^2*d^2*f)*x)*cos(f*x + e)*log(-I*cos(f*x + e) - sin(f*x + e) + 1) - 3*(a*b*d^2*e^2 + a
*b*c^2*f^2 - b^2*d^2*e - (2*a*b*c*d*e - b^2*c*d)*f)*cos(f*x + e)*log(-cos(f*x + e) + I*sin(f*x + e) + I) + 3*(
a*b*d^2*e^2 + a*b*c^2*f^2 + b^2*d^2*e - (2*a*b*c*d*e + b^2*c*d)*f)*cos(f*x + e)*log(-cos(f*x + e) - I*sin(f*x
+ e) + I) - (a^2*d^2*f^3*x^3 + 3*a^2*c*d*f^3*x^2 + 3*a^2*c^2*f^3*x)*cos(f*x + e) - 3*(b^2*d^2*f^2*x^2 + 2*b^2*
c*d*f^2*x + b^2*c^2*f^2)*sin(f*x + e))/(f^3*cos(f*x + e))
Sympy [F]
\[
\int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=\int \left (a + b \sec {\left (e + f x \right )}\right )^{2} \left (c + d x\right )^{2}\, dx
\]
[In]
integrate((d*x+c)**2*(a+b*sec(f*x+e))**2,x)
[Out]
Integral((a + b*sec(e + f*x))**2*(c + d*x)**2, x)
Maxima [B] (verification not implemented)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 1641 vs. \(2 (220) = 440\).
Time = 0.47 (sec) , antiderivative size = 1641, normalized size of antiderivative = 6.39
\[
\int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^2*(a+b*sec(f*x+e))^2,x, algorithm="maxima")
[Out]
1/3*(3*(f*x + e)*a^2*c^2 + (f*x + e)^3*a^2*d^2/f^2 - 3*(f*x + e)^2*a^2*d^2*e/f^2 + 3*(f*x + e)*a^2*d^2*e^2/f^2
+ 3*(f*x + e)^2*a^2*c*d/f - 6*(f*x + e)*a^2*c*d*e/f + 6*a*b*c^2*log(sec(f*x + e) + tan(f*x + e)) + 6*a*b*d^2*
e^2*log(sec(f*x + e) + tan(f*x + e))/f^2 - 12*a*b*c*d*e*log(sec(f*x + e) + tan(f*x + e))/f + 3*(2*b^2*d^2*e^2
- 4*b^2*c*d*e*f + 2*b^2*c^2*f^2 - 2*((f*x + e)^2*a*b*d^2 - 2*(a*b*d^2*e - a*b*c*d*f)*(f*x + e) + ((f*x + e)^2*
a*b*d^2 - 2*(a*b*d^2*e - a*b*c*d*f)*(f*x + e))*cos(2*f*x + 2*e) + (I*(f*x + e)^2*a*b*d^2 + 2*(-I*a*b*d^2*e + I
*a*b*c*d*f)*(f*x + e))*sin(2*f*x + 2*e))*arctan2(cos(f*x + e), sin(f*x + e) + 1) - 2*((f*x + e)^2*a*b*d^2 - 2*
(a*b*d^2*e - a*b*c*d*f)*(f*x + e) + ((f*x + e)^2*a*b*d^2 - 2*(a*b*d^2*e - a*b*c*d*f)*(f*x + e))*cos(2*f*x + 2*
e) + (I*(f*x + e)^2*a*b*d^2 + 2*(-I*a*b*d^2*e + I*a*b*c*d*f)*(f*x + e))*sin(2*f*x + 2*e))*arctan2(cos(f*x + e)
, -sin(f*x + e) + 1) + 2*((f*x + e)*b^2*d^2 - b^2*d^2*e + b^2*c*d*f + ((f*x + e)*b^2*d^2 - b^2*d^2*e + b^2*c*d
*f)*cos(2*f*x + 2*e) - (-I*(f*x + e)*b^2*d^2 + I*b^2*d^2*e - I*b^2*c*d*f)*sin(2*f*x + 2*e))*arctan2(sin(2*f*x
+ 2*e), cos(2*f*x + 2*e) + 1) - 2*((f*x + e)^2*b^2*d^2 - 2*(b^2*d^2*e - b^2*c*d*f)*(f*x + e))*cos(2*f*x + 2*e)
- (b^2*d^2*cos(2*f*x + 2*e) + I*b^2*d^2*sin(2*f*x + 2*e) + b^2*d^2)*dilog(-e^(2*I*f*x + 2*I*e)) - 4*((f*x + e
)*a*b*d^2 - a*b*d^2*e + a*b*c*d*f + ((f*x + e)*a*b*d^2 - a*b*d^2*e + a*b*c*d*f)*cos(2*f*x + 2*e) + (I*(f*x + e
)*a*b*d^2 - I*a*b*d^2*e + I*a*b*c*d*f)*sin(2*f*x + 2*e))*dilog(I*e^(I*f*x + I*e)) + 4*((f*x + e)*a*b*d^2 - a*b
*d^2*e + a*b*c*d*f + ((f*x + e)*a*b*d^2 - a*b*d^2*e + a*b*c*d*f)*cos(2*f*x + 2*e) - (-I*(f*x + e)*a*b*d^2 + I*
a*b*d^2*e - I*a*b*c*d*f)*sin(2*f*x + 2*e))*dilog(-I*e^(I*f*x + I*e)) + (-I*(f*x + e)*b^2*d^2 + I*b^2*d^2*e - I
*b^2*c*d*f + (-I*(f*x + e)*b^2*d^2 + I*b^2*d^2*e - I*b^2*c*d*f)*cos(2*f*x + 2*e) + ((f*x + e)*b^2*d^2 - b^2*d^
2*e + b^2*c*d*f)*sin(2*f*x + 2*e))*log(cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1) + (-I
*(f*x + e)^2*a*b*d^2 - 2*(-I*a*b*d^2*e + I*a*b*c*d*f)*(f*x + e) + (-I*(f*x + e)^2*a*b*d^2 - 2*(-I*a*b*d^2*e +
I*a*b*c*d*f)*(f*x + e))*cos(2*f*x + 2*e) + ((f*x + e)^2*a*b*d^2 - 2*(a*b*d^2*e - a*b*c*d*f)*(f*x + e))*sin(2*f
*x + 2*e))*log(cos(f*x + e)^2 + sin(f*x + e)^2 + 2*sin(f*x + e) + 1) + (I*(f*x + e)^2*a*b*d^2 - 2*(I*a*b*d^2*e
- I*a*b*c*d*f)*(f*x + e) + (I*(f*x + e)^2*a*b*d^2 - 2*(I*a*b*d^2*e - I*a*b*c*d*f)*(f*x + e))*cos(2*f*x + 2*e)
- ((f*x + e)^2*a*b*d^2 - 2*(a*b*d^2*e - a*b*c*d*f)*(f*x + e))*sin(2*f*x + 2*e))*log(cos(f*x + e)^2 + sin(f*x
+ e)^2 - 2*sin(f*x + e) + 1) - 4*(I*a*b*d^2*cos(2*f*x + 2*e) - a*b*d^2*sin(2*f*x + 2*e) + I*a*b*d^2)*polylog(3
, I*e^(I*f*x + I*e)) - 4*(-I*a*b*d^2*cos(2*f*x + 2*e) + a*b*d^2*sin(2*f*x + 2*e) - I*a*b*d^2)*polylog(3, -I*e^
(I*f*x + I*e)) - 2*(I*(f*x + e)^2*b^2*d^2 + 2*(-I*b^2*d^2*e + I*b^2*c*d*f)*(f*x + e))*sin(2*f*x + 2*e))/(-I*f^
2*cos(2*f*x + 2*e) + f^2*sin(2*f*x + 2*e) - I*f^2))/f
Giac [F]
\[
\int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=\int { {\left (d x + c\right )}^{2} {\left (b \sec \left (f x + e\right ) + a\right )}^{2} \,d x }
\]
[In]
integrate((d*x+c)^2*(a+b*sec(f*x+e))^2,x, algorithm="giac")
[Out]
integrate((d*x + c)^2*(b*sec(f*x + e) + a)^2, x)
Mupad [F(-1)]
Timed out. \[
\int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=\int {\left (a+\frac {b}{\cos \left (e+f\,x\right )}\right )}^2\,{\left (c+d\,x\right )}^2 \,d x
\]
[In]
int((a + b/cos(e + f*x))^2*(c + d*x)^2,x)
[Out]
int((a + b/cos(e + f*x))^2*(c + d*x)^2, x)